﻿using System;
using System.Collections;
using System.Drawing;


namespace SharppiFlowEditor.models
{
    public class Connector
    {
        private AbstractNode node1, node2;
        private Color color;

        private string _text;

        /*
         * Create a new connector and the change event.
         *  n1 and n2 = the connected nodes
         */
        public Connector(AbstractNode n1, AbstractNode n2)
        {
            color = Color.Black;
            node1 = n1;
            node2 = n2;
        }

        public Connector(AbstractNode n1, AbstractNode n2, string text)
        {
            color = Color.Black;
            node1 = n1;
            node2 = n2;
            _text = text;
        }

        /*
         * Get and set the first connected node.
         */
        public AbstractNode Node1
        {
            get { return node1; }
            set { node1 = value; }
        }

        /*
         * Get and set the second connected node.
         */
        public AbstractNode Node2
        {
            get { return node2; }
            set { node2 = value; }
        }

        public Color Color
        {
            get { return color; }
            set { color = value; }
        }

        public string Text
        {
            get { return _text; }
            set { _text = value; }
        }
    }
}


